using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter13
{
	/// <summary>
	/// Example04: The Mass of the Sun
	/// Calculate the mass of the Sun using the fact 
	/// that the period of the Earth's orbit around the Sun 
	/// is 3.156 \times 10^7 s and its distance from the Sun 
	/// is 1.496 \times 10^{11} m.
	/// M_s = 1.99 \times 10^{30} kg
	/// </summary>
	public class Example04
	{
		public Example04()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			double R = 1.496E11;
			double T = 365.0*24.0*60.0*60.0;
			double sunmass = 1.0/L.Gravitation.Constant
				*R*R*R*4.0*Math.PI*Math.PI/T/T;
			result+=Convert.ToString(sunmass);
		}
	}
}
